import phaser from 'phaser/src/phaser.js';
import ImageURILoaderPlugin from '../../plugins/imageuriloader-plugin.js';

class Demo extends Phaser.Scene {
    constructor() {
        super({
            key: 'examples'
        })
        this.print;
    }

    preload() {
        this.load.rexImageURI('img', imageURI);
    }

    create() {
        this.add.image(400, 300, 'img');
    }

    update() {
    }
}


var imageURI = ''

var config = {
    type: Phaser.AUTO,
    parent: 'phaser-example',
    width: 800,
    height: 600,
    scale: {
        mode: Phaser.Scale.FIT,
        autoCenter: Phaser.Scale.CENTER_BOTH,
    },
    scene: Demo,
    plugins: {
        global: [{
            key: 'rexImageURILoader',
            plugin: ImageURILoaderPlugin,
            start: true
        }]
    }
};

var game = new Phaser.Game(config);